package de.urlaub.server.data;

import java.io.Serializable;

import javax.interceptor.Interceptors;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import de.urlaub.server.logging.LoggingInterceptor;

@Entity
@Table(name="Division")
@Interceptors(LoggingInterceptor.class)
public class Division implements Serializable{

	private static final long serialVersionUID = 1578045770794946648L;
	@Id
	@Column(nullable=false)
	private int divisionId;
	@Column(nullable=false)
	private String divisionName;
	@Column(nullable=false)
	private boolean canApprove;
	
	public Division (int divisionId, String divisionName, boolean canApprove)
	{
		this.divisionId = divisionId;
		this.divisionName = divisionName;
		this.canApprove = canApprove;
	}

	public int getDevisionId() {
		return divisionId;
	}

	public void setDevisionId(int devisionId) {
		this.divisionId = devisionId;
	}

	public String getDivisionName() {
		return divisionName;
	}

	public void setDivisionName(String divisionName) {
		this.divisionName = divisionName;
	}

	public boolean isCanApprove() {
		return canApprove;
	}

	public void setCanApprove(boolean canApprove) {
		this.canApprove = canApprove;
	}
}
